package Z09Swing.ZUJian;

import javax.swing.*;

/**
 * @author 李某
 * * @date 2021/10/21
 * *物有本末，事有终始。知其先后者，则近道矣！
 * *荷花开满池塘的前一天还是半塘荷花半塘云。
 */
public class Z05单选框 {}

class Test5 {
    public static void main(String[] args) {
        JFrame f = new JFrame("Test");
        f.setSize(400,300);
        f.setLocation(580,200);
        f.setLayout(null);

        JRadioButton b1 = new JRadioButton("test");
        b1.setSelected(true);
        b1.setBounds(50,50,130,30);

        JRadioButton b2 = new JRadioButton("TEST1");
        b2.setBounds(50,100,130,30);

        System.out.println(b2.isSelected());

        f.add(b1);
        f.add(b2);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        f.setVisible(true);
    }
}